import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      //跳转成功页面
      path: '/',
      component: ()=>import('../views/LogView.vue'),
    },
    {
      //跳转到主页面
      path: '/main',
      component: ()=>import('../views/MainView.vue'),
      children:[
        {
          //会员列表
          path:'memberList',
          component:()=>import ('../views/member/memberList.vue')
        },
        {
           //会员权益
           path:'memberRightList',
          component:()=>import ('../views/member/memberRightList.vue')
        },
        { //会员等级
          path:'memberLevelList',
          component:()=>import ('../views/member/memberLevelList.vue')
        },
        //会员添加
        {
          path:'memberAdd',
          component:()=>import ('../views/member/memberAdd.vue')
        },
        //跳转修改页面
        {
          path:'memberUpdate',
          component:()=>import ('../views/member/memberUpdate.vue')
        },
        {
          path:'MeberRightadd',
          component:()=>import ('../views/member/MeberRightadd.vue')
        },
        {
          path:'memberRightUpdate',
          component:()=>import ('../views/member/memberRightUpdate.vue')
        },
        {
          path:'meberLevelAdd',
          component:()=>import ('../views/member/meberLevelAdd.vue')
        },
        {
          path:'meberLevelupdate',
          component:()=>import ('../views/member/meberLevelupdate.vue')
        },
        {
          path:'shoplist',
          component:()=>import ('../views/shop/shoplist.vue')
        },
        {
          path:'shopcount',
          component:()=>import ('../views/shop/shopcount.vue')
        },
        {
          path:'shopadd',
          component:()=>import ('../views/shop/shopadd.vue')
        },

      ],
    }
    
  ]
})

export default router
